from enum import Enum

class TipType(Enum):
    FILL = 'fill'
    SINGLE = 'single'
    MULTI = 'multi'
    JUDGE = 'judge'
    SHORT = 'short'
    ANNEX = 'annex'
    MATERIAL = 'material'

def get_map():
    return {
        TipType.FILL.value: '填空题',
        TipType.SINGLE.value: '单选题',
        TipType.MULTI.value: '多选题',
        TipType.JUDGE.value: '判断题',
        TipType.SHORT.value: '问答题',
        TipType.ANNEX.value: '附件题',
        TipType.MATERIAL.value: '材料题'
    }

def get_ques_map():
    return {
        1: TipType.SINGLE.value,
        2: TipType.SHORT.value,
        3: TipType.MULTI.value
    }

def get_key(key):
    if key in get_map():
        return get_map()[key]
    return ''

def get_ques_key(ques_key):
    if ques_key in get_ques_map():
        return get_ques_map()[ques_key]
    return ''

